{% extends 'base.html' %}
{% block title %}{{ TITLE }}{article.title}{% endblock %}
{% block page_title %}{{ article.title }}{% endblock %}
{% block toc %}
    <div>
    <h5>{{ article.md_toc|safe }}</h5>
    </div>
{% endblock %}
{% block content %}
    <div class="text-center margin-tb-1">
        {{ article.author }} {{ article.created_time }} 阅读({{ article.views }})
        评论({{ article.comment_set.count }})
    </div>
    <article style="word-wrap: break-word">
        {{ article.md_content |safe }}
    </article>
    <div id=" coment" class="margin-tb-2">
        <h5>
            留言 ({{ article.comment_set.count }}条)
            <a href="{% url 'myblog:comment' article.pk %}" class="font-size-10">我要留言</a>
        </h5>
        <hr>
        <ul class="no-padding-left">
            {% for comment in article.comment_set.all %}
            <li class="comment margin-tb-1">
                <span class="font-size-8">{{ comment.user }} {{ comment.created_time }}说：</span>
                <div class="text">
                    {{ comment }}
                </div>
            </li>
                {% empty %}
                暂无评论
            {% endfor %}
        </ul>
    </div>
{% endblock %}
